Request message format
Type: Websocket Info Description: Standard format of WebSocket request messages
Parameters
name | type | mandatory | default | description |
---|---|---|---|---|
– | – | false | N/A | No parameters required |
Notes
- Request messages are used to subscribe or unsubscribe from WebSocket topics.
- Parameter format: {topic}@{arg},{arg},…
listenKey
must be applied via the /v4/ws-token endpoint.id
is a custom request identifier for matching responses.
Subscribe Example
Subscribe
{
"method": "subscribe",
"params": [
"\{topic\}@\{arg\},\{arg\}", // Event subscription
"\{topic\}@\{arg\}"
],
"listenKey": "512312356123123123", // Listener key from /v4/ws-token
"id": "\{id\}"
}